home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Audio dcmds
/
Audio CD dcmds.sit
/
Audio CD dcmds.π
/
Think Put Lib source
/
__HexToText.c
< prev
next >
Wrap
Text File
|
1994-06-12
|
247b
|
13 lines
void __HexToText (unsigned long hex, char* str, short size /* 0=word, 1=long */ )
{
int n, len;
char* digits = "0123456789ABCDEF";
len = size ? 8-1 : 4-1;
for ( n = len; n >= 0; n-- )
{
str[n] = digits[hex % 16];
hex /= 16;
}
}